usbip: fix vudc_rx: harden CMD_SUBMIT path to handle malicious input
authorShuah Khan <shuahkh@osg.samsung.com>
Sat, 23 Dec 2017 02:23:46 +0000 (19:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jan 2018 08:38:56 +0000 (09:38 +0100)
commit86c8d58fc7538d0f44367f49d24568e925049c0d
tree610d4f360a27fd88cb7159e2f311f203cde0a9c9
parent6851ec74bfe44e8aa568fd00603759c4a2918752
usbip: fix vudc_rx: harden CMD_SUBMIT path to handle malicious input

commit b78d830f0049ef1966dc1e0ebd1ec2a594e2cf25 upstream.

Harden CMD_SUBMIT path to handle malicious input that could trigger
large memory allocations. Add checks to validate transfer_buffer_length
and number_of_packets to protect against bad input requesting for
unbounded memory allocations.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usbip/vudc_rx.c